home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #2
/
Amiga Plus CD - 1995 - No. 2.iso
/
pd
/
mui
/
mirrormanager
/
install-mirrormanager
< prev
next >
Wrap
Text File
|
1995-04-11
|
21KB
|
829 lines
;; -*- Lisp -*-
;; $VER: $Id: Install-MirrorManager,v 1.4 1994/06/24 16:46:02 tf Exp $
;;
;; MirrorManager Installation script
;; Initial revision by Tobias Ferber
;;
(set VersionNumber "1.10R")
(set Registered (= (substr VersionNumber (- (strlen VersionNumber) 1) ) 'R'))
(set InitialInstallment 1)
;shitty default destination?
(if (exists (tackon @default-dest "MirrorManager/MakeDist")) (set @default-dest "RAM:"))
(set ApplicationPath "MirrorManager")
(set HelpPath "docs")
(set CatalogsPath "catalogs")
(set SourcesPath "source")
(set IconPath "icons")
(set ExtrasPath "xtras")
(set ARexxScriptsPath "rexx")
(set ARexxShellPath "rexx/rexx")
(set ARexxTermPath "rexx/term")
(set ARexxFastCallPath "rexx/fastcall")
(set RegisterForm "RAM:OrderForm")
(set RegisterName "")
(set RegisterAddress1 "")
(set RegisterAddress2 "")
(set RegisterAddress3 "")
(set RegisterCountry "")
(set RegisterPhone "")
(set RegisterEMail "")
(if (exists "MakeDist")
(abort
"This Installer script will only work properly when executed from within a distribution directory!"
"\n\n"
"It will not work from within the author's installation. "
"Use MakeDist in order to prepare a proper distribution. "
)
;else
(message
"\n\nMirrorManager installation script.\n"
"This script installs MirrorManager on your Amiga.\n\n"
"MirrorManager is Copyright ©1994 by\n"
"Tobias Ferber and Harald Kunze\n"
"All Rights Reserved."
)
)
(welcome "Welcome to the MirrorManager installation!")
;; Make sure that we are running under 2.04 or better
(if (< (/ (getversion) 65536) 37)
(abort "You must be using Kickstart 2.04 or higher to install and use MirrorManager.")
)
(transcript ("Installing MirrorManager v%s for AmigaDOS..." VersionNumber))
(complete 0)
;***
(procedure copyIcons
; copyIconsFrom
(working ("Installing icons from %s..." copyIconsFrom))
(foreach copyIconsFrom "#?"
(if (> @each-type 0) ;-> a directory
(
(set copyIconsFrom (tackon copyIconsFrom @each-name))
(copyIcons)
(set copyIconsFrom (pathonly copyIconsFrom))
)
;else
(
(set fname (tackon @default-dest (substr (tackon copyIconsFrom @each-name) (strlen "icons/x/"))))
(if (if (AND (exists fname) (> @user-level 1))
(askbool
(prompt
("%s already exists.\n" fname)
"Would you like me to replace it?"
)
(help @askbool-help)
) 1 )
(
(set fname (substr fname 0 (- (strlen fname) (strlen ".info"))))
(if (exists fname)
(copyfiles
(source (tackon copyIconsFrom @each-name))
(dest (pathonly fname))
(prompt ("Copying icon image for %s..." fname))
(help @copyfiles-help)
;(confirm)
)
;else
;(message ("%s does not exist" fname))
)
)
)
)
)
)
)
;***
(procedure registerNow
(set RegisterName (askstring
(prompt (cat "Please enter your full name\n\n"
("%s\n" RegisterName)
("%s\n" RegisterAddress1)
("%s\n" RegisterAddress2)
("%s\n" RegisterAddress3)
("%s\n" RegisterCountry)
"\n"
("%s\n" RegisterPhone)
("%s\n" RegisterEMail)
))
(default RegisterName)
(help @askstring-help)
))
(set RegisterAddress1 (askstring
(prompt (cat "Please enter the first line of your address\n\n"
("%s\n" RegisterName)
("%s\n" RegisterAddress1)
("%s\n" RegisterAddress2)
("%s\n" RegisterAddress3)
("%s\n" RegisterCountry)
"\n"
("%s\n" RegisterPhone)
("%s\n" RegisterEMail)
))
(default RegisterAddress1)
(help @askstring-help)
))
(set RegisterAddress2 (askstring
(prompt (cat "Please enter the second line of your address\n\n"
("%s\n" RegisterName)
("%s\n" RegisterAddress1)
("%s\n" RegisterAddress2)
("%s\n" RegisterAddress3)
("%s\n" RegisterCountry)
"\n"
("%s\n" RegisterPhone)
("%s\n" RegisterEMail)
))
(default RegisterAddress2)
(help @askstring-help)
))
(set RegisterAddress3 (askstring
(prompt (cat "Please enter the third line of your address\n\n"
("%s\n" RegisterName)
("%s\n" RegisterAddress1)
("%s\n" RegisterAddress2)
("%s\n" RegisterAddress3)
("%s\n" RegisterCountry)
"\n"
("%s\n" RegisterPhone)
("%s\n" RegisterEMail)
))
(default RegisterAddress3)
(help @askstring-help)
))
(set RegisterCountry (askstring
(prompt (cat "Please enter your country\n\n"
("%s\n" RegisterName)
("%s\n" RegisterAddress1)
("%s\n" RegisterAddress2)
("%s\n" RegisterAddress3)
("%s\n" RegisterCountry)
"\n"
("%s\n" RegisterPhone)
("%s\n" RegisterEMail)
))
(default RegisterCountry)
(help @askstring-help)
))
(set RegisterPhone (askstring
(prompt (cat "Please enter your phone number\n\n"
("%s\n" RegisterName)
("%s\n" RegisterAddress1)
("%s\n" RegisterAddress2)
("%s\n" RegisterAddress3)
("%s\n" RegisterCountry)
"\n"
("%s\n" RegisterPhone)
("%s\n" RegisterEMail)
))
(default RegisterPhone)
(help @askstring-help)
))
(set RegisterEMail (askstring
(prompt (cat "Please enter your E-Mail address\n\n"
("%s\n" RegisterName)
("%s\n" RegisterAddress1)
("%s\n" RegisterAddress2)
("%s\n" RegisterAddress3)
("%s\n" RegisterCountry)
"\n"
("%s\n" RegisterPhone)
("%s\n" RegisterEMail)
))
(default RegisterEMail)
(help @askstring-help)
))
(if (askbool
(prompt (cat
("%s\n" RegisterName)
("%s\n" RegisterAddress1)
("%s\n" RegisterAddress2)
("%s\n" RegisterAddress3)
("%s\n" RegisterCountry)
"\n"
("%s\n" RegisterPhone)
("%s\n" RegisterEMail)
("\nIs that correct ?")
))
(choices "Yes" "No")
(help @askbool-help)
)
(
(set feevia (askchoice
(prompt "I am sending the shareware fee via\n(Please mark as appropriate)")
(help @askchoice-help)
(choices
("DM 10.- in bills")
("SFr 10.- in bills")
("US$ 10.- in bills")
("eurocheque in DM")
("foreign cheque (extra US$10 for cashing)")
("Bank transfer")
)
))
(textfile
(prompt "Generating OrderForm...")
(help @textfile-help)
(dest RegisterForm)
(append (cat
"\n\n\n\n\n\n\n"
" ------------------------\n\n"
" Tobias Ferber\n"
" Goethestraße 32\n"
" 76135 Karlsruhe\n\n"
" GERMANY\n\n"
" ------------------------\n\n\n"
" Dear Tobias, Dear Harald,\n\n"
" I would like to become a registered user of \"MirrorManager\"\n"
" to support further development of this application.\n"
" Please send me the disk containing the latest release to\n\n"
(" Name: %s\n" RegisterName)
(" Address: %s\n" RegisterAddress1)
(" %s\n" RegisterAddress2)
(" %s\n" RegisterAddress3)
(" Country: %s\n" RegisterCountry)
(" Phone: %s\n" RegisterPhone)
(" E-Mail: %s\n\n" RegisterEMail)
(" I am sending the shareware fee via %s\n\n\n"
(select feevia
("DM 10.- in bills,\n coming with this letter.")
("SFr 10.- in bills,\n coming with this letter.")
("US$ 10.- in bills,\n coming with this letter.")
("eurocheque in DM,\n coming with this letter.")
("foreign cheque in US$,\n coming with this letter\n"
" (including extra $10 for cashing).")
("Bank transfer.")
))
" I have read the license and distribution details and agree.\n\n\n"
" _____________________ ___________________________________________\n"
" (Date) (Signature)\n"
)
)
)
(message ("An order form has been written to\n%s\n" RegisterForm))
)
;else
(registerNow)
)
)
;***
(set todo
(askoptions
(prompt
("Select the parts of MirrorManager you want to install this time")
)
(help
"This part of the installation procedure lets you select the "
"parts of the MirrorManager package you want to install at this time."
"\n\n"
"MirrorManager's GUI application, the MUI front end, is the "
"recommended host for the supplied ARexx script files."
"\n\n"
"The ARexx scripts are the heart of MirrorManager. "
"They do all the work. "
"All ARexx scripts needed by the GUI will be installed by "
"selecing the GUI."
"\n"
"The additional ARexx scripts and the C sources are available "
"in the registered version only!"
"\n"
"Click \"Proceed\" to select the icons to be installed."
)
(choices
;--- bit 0
("MirrorManager MUI front end")
;--- bit 1
("Guides, help and docs")
;--- bit 2
("Additional ARexx scripts")
;--- bit 3
("sources (C language)")
;--- bit 4
("(ß-Tester) Extras")
)
(default (if Registered 31 3))
)
)
(complete 5)
;Warn if we are about to install our GUI on a system without MUI...
(if (and (in todo 0) (not (exists ("libs:muimaster.library") (noreq))) )
(if (askbool
(prompt
"The supplied MirrorManager GUI requires\n"
"MUI - MagicUserInterface\n"
"(c) Copyright 1993 by Stefan Stuntz\n"
"\n"
"I've not been able to locate muimaster.library on "
"your system. "
"You definitely need MUI if you want to use MirrorManager "
"with the supplied GUI application.\n"
"\n"
"Click `Help' for more information about MUI and how "
"to obtain it...\n"
)
(choices "Skip GUI installation" "Install GUI now")
(help
"MUI is a system to generate and maintain graphical user interfaces. "
"With the aid of a preferences program, the user of an application has "
"the ability to customize the outfit according to his personal taste."
"\n\n"
"MUI is distributed as shareware. "
"To obtain a complete package containing lots of examples and more "
"information about registration please look for a file called "
"\"muiXXusr.lha\" (XX means the latest version number) "
"on your local bulletin boards or on public domain disks."
"\n\n"
"If you want to register directly, feel free to send\n"
"\n"
" DM 20.- or US$ 15.-\n"
"\n"
" to\n"
"\n"
" Stefan Stuntz\n"
" Eduard-Spranger-Straße 7\n"
" 80935 München\n"
" GERMANY\n"
)
) (set todo (- todo 1)) )
(if (= @user-level 2) ;<-- expert user having MUI
(set vernum (getversion "libs:muimaster.library"))
(set ver (/ vernum 65536))
(set rev (- vernum (* ver 65536) ))
(message
"Installing the MirrorManager GUI for\n"
("muimaster.library version %ld.%ld" ver rev)
)
)
)
(set icontype
(askchoice
(prompt
"Select the type of icons to be installed for MirrorManager."
)
(help
"MirrorManager can be executed from the Workbench "
"by double-clicking the icon images.\n"
"\n"
"The 4 color icons can be used on every system. "
"They only use the first 4 colors of the system palette which are "
"initially set to black, white, blue and the background color grey "
"by Commodore.\n"
"\n"
"MagicWB is a SHAREWARE product by Martin Huttenloher which "
"uses 4 additional colors. It includes a replacement icon for "
"nearly all of the Commodore icons, amazing background patterns "
"and loads of additional icons and brushes for nearly all sorts "
"of applications.\n"
"\n"
"Friends of an impressive and plastic Workbench should definitely take "
"a closer look at is MagicWB package which can be obtained from\n"
"\n"
" Martin Huttenloher\n"
" Am Hocksträss 4\n"
" D89081 Ulm\n"
" Germany/Europe"
)
(choices
("4 color Commodore Workbench icons")
("8 color MagicWB icons (8 planes)")
("No (new) icons")
)
(default 0) ;MagicWB icons
)
)
(if (< icontype 2) (set IconPath (tackon IconPath (if (= icontype 0) "4" "8"))) )
(complete 10)
;+++
;(message ("Icon type is %ld (%s)" icontype IconPath))
;+++
(set @default-dest
(askdir
(prompt
"Where shall I install MirrorManager to?\n"
"A directory \"MirrorManager\" will be created..."
)
(help @askdir-help)
(default @default-dest)
)
)
(complete 20)
(set @default-dest (tackon @default-dest ApplicationPath))
(if (set InitialInstallment (exists @default-dest))
(message (cat
("The directory \"%s\" already exists." @default-dest)
"\n"
"Proceeding might replace existing files..."
"\n\n"
"However your current settings in the configuration script MirrorManager.rexx will NOT be replaced. "
))
;else
(makedir @default-dest
(prompt ("Creating directory %s" @default-dest) )
(help @makedir-help)
(infos)
)
)
(complete 30)
(working "Installing top level stuff...")
(copyfiles
(source "")
(dest @default-dest)
(pattern "(Unstall-MirrorManager|ReadMe)")
(prompt "Copying top level stuff...")
(help @copyfiles-help)
(confirm)
)
(complete 40)
(if (in todo 0)
(
(working "Installing the MUI front end...")
(copyfiles
(source "MirrorManager")
(dest @default-dest)
(prompt "Copying the MUI front end...")
(help @copyfiles-help)
(confirm)
)
(working "Installing catalog files...")
(copyfiles
(source CatalogsPath)
(dest (tackon @default-dest CatalogsPath))
(all)
(prompt "Copying catalog files...")
(help @copyfiles-help)
(confirm "average")
)
(working "Installing ARexx scripts...")
(copyfiles
(source ARexxScriptsPath)
(dest (tackon @default-dest ARexxScriptsPath))
(files)
(pattern "~(MirrorManager.rexx)")
(prompt "Copying ARexx scripts...")
(help @copyfiles-help)
(confirm)
)
(if (exists (tackon (tackon @default-dest ArexxScriptsPath) "MirrorManager.rexx"))
(copyfiles
(prompt "Copying MirrorManager.rexx...")
(help @copyfiles-help)
(source (tackon ARexxScriptsPath "MirrorManager.rexx"))
(dest (tackon @default-dest ARexxScriptsPath))
(newname
(askfile
(prompt "Choose a different name for the new configuration...")
(help
"MirrorManager.rexx (your default configuration file) already exists. "
"Overwriting it will destroy your current settings including your "
"path and filename definitions. "
)
(default (tackon (tackon @default-dest ARexxScriptsPath) "MirrorManager.rexx.NEW"))
)
)
)
;else
(copyfiles
(source (tackon ARexxScriptsPath "MirrorManager.rexx"))
(dest (tackon @default-dest ARexxScriptsPath))
(prompt "Copying MirrorManager.rexx...")
(help @copyfiles-help)
(confirm)
)
)
))
(complete 50)
(if (in todo 1)
(
(working "Installing Help and manual files...")
(copyfiles
(source HelpPath)
(all)
(dest (tackon @default-dest HelpPath))
(prompt "Copying Help and document files...")
(help @copyfiles-help)
(confirm)
)
))
(complete 60)
(if (in todo 2)
(
(working "Installing additional ARexx script files...")
(if Registered
(set xtras (askoptions
(prompt
("Select the additional ARexx scripts you want to install this time")
)
(help @askoptions-help)
(choices
;--- bit 0
("Shell")
;--- bit 1
("Term 3.4")
;--- bit 2
("FastCall")
)
))
;else
(set xtras 1) ;Shell
)
(if (in xtras 0)
(
(working "Installing Shell ARexx scripts...")
(copyfiles
(source ARexxShellPath)
(all)
;(dest "REXX:")
(dest (tackon @default-dest ARexxShellPath))
(prompt "Copying Shell ARexx script files...")
(help @copyfiles-help)
(confirm "average")
)
))
(if (in xtras 1)
(
(working "Installing Term ARexx scripts...")
(copyfiles
(source ARexxTermPath)
(all)
(dest (tackon @default-dest ARexxTermPath))
(prompt "Copying Term ARexx script files...")
(help @copyfiles-help)
(confirm "average")
)
))
(if (in xtras 2)
(
(working "Installing FastCall ARexx scripts...")
(copyfiles
(source ARexxFastCallPath)
(all)
(dest (tackon @default-dest ARexxFastCallPath))
(prompt "Copying FastCall ARexx script files...")
(help @copyfiles-help)
(confirm "average")
)
))
))
(complete 70)
(if (in todo 3)
(
(if Registered
(
(working "Installing C source code and Makefiles...")
(copyfiles
(source SourcesPath)
(all)
(dest (tackon @default-dest SourcesPath))
(prompt "Copying C source code and Makefiles...")
(help @copyfiles-help)
(confirm)
)
)
;else
(if (askbool
(prompt
("MirrorManager v%s ist shareware\n" VersionNumber)
"This is an unregistered demo version\n"
"\n"
"You should register if you like MirrorManager "
"to support further development."
)
(help "Click \"Register Now\" and you will see ...")
(choices "Register Now" "Skip This Part")
)
(registerNow)
;else
(message ("Hmmm... You really should register!"))
)
)
))
(complete 80)
(if (in todo 4)
(
(working "Installing BETA-TESTER extras...")
(copyfiles
(source ExtrasPath)
(all)
(dest (tackon @default-dest ExtrasPath))
(prompt "Copying BETA-TESTER extras...")
(help @copyfiles-help)
(confirm)
)
))
(complete 85)
(if (< icontype 2)
(
(working "Installing icon images ...")
(set copyIconsFrom IconPath) (copyIcons)
(complete 87)
(working "Installing additional icon images ...") ; I.e. icons without files behind them
(set n 0)
(while (set fname (select n "xtras/def_mm.info" ;default project icon image
"xtras/MirrorManager1.info"
"xtras/MirrorManager2.info"
""))
(
(set n (+ n 1))
(if (exists (tackon IconPath fname))
(
(copyfiles
(source (tackon IconPath fname))
(dest (tackon @default-dest "xtras"))
(prompt ("Copying icon image `%s' ..." fname))
(help @copyfiles-help)
;(confirm)
)
))
))
(complete 89)
(copyfiles
(source ("%s.info" IconPath))
(dest (pathonly @default-dest))
(newname ("%s.info" @default-dest))
(prompt ("Copying drawer icon image for %s..." @default-dest))
(help @copyfiles-help)
;(confirm)
)
))
(complete 90)
(if (AND
(exists (tackon @default-dest "xtras/def_mm.info"))
(exists (tackon @default-dest "MirrorManager.info")))
(
(set project-icon-tooltype
(askchoice
(prompt "Set up the default tool for MirrorManager's configuration project icon.")
(help (cat
"MirrorManager can save project icons with the configuration. "
"If you want MirrorManager to do so, you might want to set up "
"the supplied `def_mm.info' project icon."
"\n\n"
"RELATIVE PATHNAMES\n\n"
"You will usually save your configuration files into the MirrorManager/rexx "
"drawer, so the default tool for your configuration would be the MirrorManager "
"tool in the parent directory."
"\n"
"Relative pathnames have the advantage that the MirrorManager drawer "
"can still be moved to any location on your hard drive without changing "
"the default tool in all the project icons."
"\n\n"
"ABSOLUTE PATHNAMES\n\n"
"Using absolute pathnames in the project icon allows you to store your "
"configuration scripts to any location. "
"However, when moving the MirrorManager drawer you'll have to adjust "
"the default tool's pathname in all project icons."
))
(choices
("No project icon") ;0
("Smart relative pathname") ;1
("Custom (absolute) pathname") ;2
)
(default 0)
)
)
(if (> project-icon-tooltype 0)
(
(tooltype
(dest (tackon @default-dest "MirrorManager"))
(prompt "Modifying MirrorManager CONFIGICON ToolType...")
(help @tooltype-help)
;(setstack 10240)
(settooltype "CONFIGICON" "xtras/def_mm.info")
)
;by default: smart pathnames -> modify the tooltype only if they want a custom pathnames
(if (> project-icon-tooltype 1)
(
(tooltype
(dest (tackon @default-dest "MirrorManager"))
(prompt "Modifying MirrorManager APPSTART ToolType...")
(help @tooltype-help)
;(setstack 10240)
(settooltype "APPSTART" (askfile
(prompt "Select the default tool for the MirrorManager project icon...")
(help @askfile-help)
(default (tackon @default-dest "MirrorManager"))
))
)
))
))
))
(complete 100)
(if (AND
(exists (tackon @default-dest "rexx/MirrorManager.rexx"))
(exists (tackon @default-dest "rexx/Configure.rexx")) )
(exit
"You should configure your MirrorManager GUI application now. "
"Configuring can be done by double-clicking the Configure icon in the "
"MirrorManager/rexx drawer. "
"This will modify the supplied ARexx script rexx/MirrorManager.rexx "
"for your personal installation."
)
)